//package demo2.demo2.security;
//
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//import org.springframework.web.accept.ContentNegotiationStrategy;
//
///**
// * = Security configuration
// * <p>
// * Configuration class for subjects related to the security layer of the
// * application.
// */
//@Configuration
//@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
//@EnableWebSecurity
//public class SecurityConfiguration {
//
//    /**
//     * Default configuration for development environment.
//     */
//    @Configuration
//    protected static class WebSecurityConfigDev extends WebSecurityConfigurerAdapter {
//
//        /**
//         * Default security configuration for development environment. This disallows
//         * the login.
//         */
//        @Override
//        protected void configure(HttpSecurity http) throws Exception {
//            // Authentication is disabled for development environment
//            http.authorizeRequests().antMatchers("/**").permitAll()
//            .and().csrf().disable();
//
//
//            //  允许所有用户访问"/"和"/index.html"
////            http.authorizeRequests()
////                    .antMatchers("/", "/index.html").permitAll()
////                    .anyRequest().authenticated()   // 其他地址的访问均需验证权限
////                    .and()
////                    .formLogin()
////                    .loginPage("/login.html")   //  登录页
////                    .failureUrl("/login-error.html").permitAll()
////                    .and()
////                    .logout()
////                    .logoutSuccessUrl("/index.html");
//
//        }

//    /*@Override
//  	public void setContentNegotationStrategy(
//  			ContentNegotiationStrategy contentNegotiationStrategy) {
//    	super.setContentNegotationStrategy(contentNegotiationStrategy);
//  	}*/
//
//    }
//
//}
